Inside Macintosh: Files

Previous | Chapter Top | Chapter Contents | Next

Updating Volumes

When you close a file, you should call FlushVol to ensure that any changed contents of the file are written to the volume.

FlushVol

You can use the FlushVol function to write the contents of the volume buffer and update information about the volume.

FUNCTION FlushVol (volName: StringPtr; vRefNum: Integer): OSErr;
volName
A pointer to the name of a mounted volume.
vRefNum
A volume reference number, a working directory reference number, a drive number, or 0 for the default volume.

DESCRIPTION

On the specified volume, the FlushVol function writes the contents of the associated volume buffer and descriptive information about the volume (if they've changed since the last time FlushVol was called). This information is written to the volume.

RESULT CODES

noErr

0

No error

nsvErr

-35

No such volume

ioErr

-36

I/O error

bdNamErr

-37

Bad volume name

paramErr

-50

No default volume

nsDrvErr

-56

No such drive


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next